package com.zy.cat.entity.mall;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Index;
import javax.persistence.Table;

import com.zy.cat.entity.primary.CatGoodsCouponHistoryPrimary;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Entity
@Table(name = "zy_cat_goods_coupon_history", indexes = {
		@Index(name = "pid", columnList = "pid"),
		@Index(name = "numIid", columnList = "num_iid")})
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("9趣猫用户商品优惠券实体类")
@IdClass(CatGoodsCouponHistoryPrimary.class)
public class CatGoodsCouponHistory {
	
	@Id
	@Column(columnDefinition = "VARCHAR(20) NOT NULL COMMENT '用户账号ID'")
	@ApiModelProperty(value = "用户账号ID", example = "fe53d6a4fa29641")
	private String pid;
	
	@Id
	@Column(name = "num_iid", columnDefinition = "VARCHAR(30) DEFAULT '-'  COMMENT '商品ID'")
	@ApiModelProperty(value="商品ID",example="13541094929")
    private String numIid;
	
	@Column(columnDefinition = "VARCHAR(20) NOT NULL  COMMENT '创建时间[9趣猫商品补贴红包实体类]'")
	@ApiModelProperty(value = "创建时间", example = "2019-02-22 12:56:56:666")
	private String ctime;
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '最后更改时间'")
	@ApiModelProperty(value = "最后更改时间", example = "2019-02-22 12:56:56:666")
	private String ltime;
	
	@Column(name = "category_id", columnDefinition = "BIGINT(32) DEFAULT '0'  COMMENT '分类ID'")
	@ApiModelProperty(value="分类ID",example="")
	private String categoryId;
	
	@Column(name = "coupon_click_url", columnDefinition = "VARCHAR(600) DEFAULT '-'  COMMENT '优惠券领券链接'")
	@ApiModelProperty(value="优惠券领券链接",example="https://uland")
    private String couponClickUrl;
	
	@Column(name = "coupon_end_time", columnDefinition = "VARCHAR(10) NOT NULL  COMMENT '优惠券结束时间'")
	@ApiModelProperty(value="优惠券结束时间",example="2019-06-23")
    private String couponEndTime;
	
	@Column(name = "coupon_info", columnDefinition = "VARCHAR(50) DEFAULT '-'  COMMENT '优惠券信息'")
	@ApiModelProperty(value="优惠券信息",example="满79元减15元")
    private String couponInfo;
	
	@Column(name = "coupon_remain_count", columnDefinition = "BIGINT(32) DEFAULT '0'  COMMENT '优惠券剩余数量'")
	@ApiModelProperty(value="优惠券剩余数量",example="1500")
    private String couponRemainCount;

	@Column(name = "coupon_start_time", columnDefinition = "VARCHAR(10) NOT NULL  COMMENT '优惠券开始时间'")
	@ApiModelProperty(value="优惠券开始时间",example="2019-06-13")
    private String couponStartTime;
	
	@Column(name = "coupon_total_count", columnDefinition = "BIGINT(32) DEFAULT '0'  COMMENT '优惠券总数量'")
	@ApiModelProperty(value="优惠券总数量",example="3500")
    private String couponTotalCount;
	
	@Column(name = "coupon_type",columnDefinition = "INT(1) NOT NULL COMMENT '优惠券类型：1 公开券，2 私有券，3 妈妈券'")
	@ApiModelProperty(value="优惠券类型：1 公开券，2 私有券，3 妈妈券 ",example="")
    private int coupon_type;
	
	@Column(name = "sclick_url", columnDefinition = "VARCHAR(600) DEFAULT '-'  COMMENT '商品详情页'")
	@ApiModelProperty(value="商品详情页",example="https://s.click.")
    private String sclickUrl;
	
	@Column(name = "tbk_pwd", columnDefinition = "VARCHAR(50) DEFAULT '-'  COMMENT '商品淘口令'")
	@ApiModelProperty(value="商品淘口令",example="￥LiDqY4Oshhz￥")
    private String tbkPwd;
	
	@Column(name = "coupon_short_url", columnDefinition = "VARCHAR(100) DEFAULT '-'  COMMENT '商品短链接'")
	@ApiModelProperty(value="商品短链接",example="http://t.cn/AiNva2mN")
    private String couponShortUrl;
	
	@Column(name = "commission_rate", columnDefinition = "DOUBLE(5,2) DEFAULT '0'  COMMENT '该产品佣金比例'")
	@ApiModelProperty(value="该产品佣金比例，多级代理依此值计算。值10表示10%",example="20.00")
    private Double commissionRate;
	
	@Column(name = "zk_final_price", columnDefinition = "VARCHAR(30) DEFAULT '-'  COMMENT '产品折后价'")
	@ApiModelProperty(value="产品折后价",example="")
    private String zkFinalPrice;
	
	@Column(name = "volume", columnDefinition = "BIGINT(32) DEFAULT '0'  COMMENT '最近30天销量'")
	@ApiModelProperty(value="最近30天销量",example="630")
    private String volume;
	
	@Column(name = "user_type", columnDefinition = "VARCHAR(2) DEFAULT '-'  COMMENT '1、表示天猫，0、表示淘宝'")
	@ApiModelProperty(value="1、表示天猫，0、表示淘宝",example="1")
    private String userType;
	
	@Column(name = "title", columnDefinition = "VARCHAR(100) DEFAULT '-'  COMMENT '产品标题'")
	@ApiModelProperty(value="产品标题",example="")
    private String title;
	
	@Column(name = "seller_id", columnDefinition = "VARCHAR(30) DEFAULT '-'  COMMENT '卖家id'")
	@ApiModelProperty(value="卖家id",example="")
    private String sellerId;
	
	@Column(name = "reserve_price", columnDefinition = "VARCHAR(30) DEFAULT '-'  COMMENT '原价'")
	@ApiModelProperty(value="原价",example="")
    private String reservePrice;
	
	@Column(name = "pict_url", columnDefinition = "VARCHAR(255) DEFAULT '-'  COMMENT '商品主图'")
	@ApiModelProperty(value="商品主图",example="")
    private String pictUrl;
	
	@Column(name = "nick", columnDefinition = "VARCHAR(50) DEFAULT '-'  COMMENT '卖家id'")
	@ApiModelProperty(value="卖家昵称",example="")
    private String nick;
	
	@Column(name = "item_url", columnDefinition = "VARCHAR(255) DEFAULT '-'  COMMENT '表示产品链接地址'")
    @ApiModelProperty(value="表示产品链接地址（天猫国际有的也是taobao.com链接，要结合user_type分析）",example="")
    private String itemUrl;
    
	@Column(name = "cat_name", columnDefinition = "VARCHAR(50) DEFAULT '-'  COMMENT '分类名'")
    @ApiModelProperty(value="分类名",example="")
    private String catName;
    
	@Column(name = "cat_leaf_name", columnDefinition = "VARCHAR(50) DEFAULT '-'  COMMENT '分类子叶'")
    @ApiModelProperty(value="分类子叶",example="")
    private String catLeafName;

	public CatGoodsCouponHistory(String pid) {
		super();
		this.pid = pid;
	}
    
    
}
